//
//  User.h
//  Gegeda_music_MY
//
//  Created by lanou3g on 15/11/4.
//  Copyright © 2015年 周莹. All rights reserved.
//

#import <Foundation/Foundation.h>
static NSString * LAST_POST = @"last_post";
@class User;

@protocol UserDelegate <NSObject>

#pragma mark - 通过代理来判断登录状态--在block执行结束的时候执行代理
-(void)judgeUserLoginStateWithUser:(User*)user withIsLogin:(BOOL)isLogin;

@end

@interface User : NSObject

+(instancetype)sharedInstance;

@property(nonatomic,assign)id <UserDelegate> delegate;

@property(nonatomic,assign)BOOL isLogin;

#pragma mark - Login
-(void)loginWithUserName:(NSString *)username withPassword:(NSString *)password;
#pragma mark - Register
-(void)registWithUserName:(NSString *)username withPassword:(NSString *)password withEmail:(NSString *)email withMobilePhoneNumber:(NSString *)mobilePhoneNumber
;




/**
 *  用户名
 */
@property (nonatomic,copy)NSString *name;
/**
 * 密码
 */
@property (nonatomic,copy)NSString *password;
/**
 *  邮箱
 */
@property (nonatomic,copy)NSString *email;

@end
